# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kamera
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/graphics"
pkgdesc="KDE integration for gphoto2 cameras"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kconfigwidgets-dev kxmlgui-dev kio-dev ki18n-dev kconfig-dev kdoctools-dev libgphoto2-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kamera-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="56393780a07c72c069595188a56eb449873683942a404343336a36c598036b4a339795af8441c073b2a9a5b5145b913ed19d0f7f19933cf999d87886e9aa5592  kamera-20.04.3.tar.xz"
